//
//  CPetObject.cpp
//  Monster_Martial_Arts_Version_0
//
//  Created by chiawei.tseng on 13/1/10.
//
//

#include "CPetObject.h"
//#include "CAnimationSystem.h"
//#include "CArmature.h"
//#include "CMonsterData.h"
//#include "CCArmatureFactory.h"
//#include "CTouchAction.h"
//#include "CAIManager.h"
#include "CAIBehaviorWaitCommand.h"
#include "CAIBehaviorMove.h"

CPetObject::CPetObject():CBattleObject()
{
   
}

CPetObject::~CPetObject()
{
    
}

bool CPetObject::Init(CCNode* pNode , fPoint point)
{
    if (!CBattleObject::Init(pNode , point))
        return false;
    
    if (m_pAiManager)
    {
        m_pAiManager->AddState(BATTLE_OBJECT_STATE_WAIT_COMMAND, CAIBehavior::Create<CAIBehaviorWaitCommand>(m_pAiManager));
        
        m_pAiManager->AddState(BATTLE_OBJECT_STATE_MOVE, CAIBehavior::Create<CAIBehaviorMove>(m_pAiManager));
        
        m_pAiManager->SetInitialState(BATTLE_OBJECT_STATE_WAIT_COMMAND);
        
        m_pAiManager->Init(this);
    }
    
    
       
    return true;
}

void CPetObject::Update(CCNode* pNode, float dTime)
{
    CBattleObject::Update(pNode, dTime);
}


void CPetObject::Release(CCNode* pNode)
{
    CBattleObject::Release(pNode);
}
